package crm.view.desktop.iFrame.views;

import java.awt.Graphics;
import java.awt.Image;

import javax.swing.JComponent;

import crm.model.teacherPC.CRMListener;
import crm.model.teacherPC.Manager;
import crm.model.teacherPC.net.StudentPC;



public class DesktopVisualisizer extends JComponent implements CRMListener{
	public StudentPC student;
	Image image;
	public DesktopVisualisizer(StudentPC student, Manager m) {
		this.student=student;
		image = student.getScreenshot();
		m.addListener(this);
	}

	public void paint(Graphics g) {
		g.drawImage(image, 0, 0, getWidth(), getHeight(), this);
	}

	public void actualisingComplete(StudentPC student) {
		image = this.student.getScreenshot();
		repaint();
	}

	@Override
	public void connectionClosed() {
		// TODO Auto-generated method stub

	}

	@Override
	public void connectionStarted() {
		// TODO Auto-generated method stub

	}

	@Override
	public void exitCRM() {
		// TODO Auto-generated method stub

	}

	@Override
	public void studentAdded(StudentPC student) {
		// TODO Auto-generated method stub

	}

	@Override
	public void studentRemoved(StudentPC student) {
		// TODO Auto-generated method stub

	}
}
